package org.microdream.easy.deploy.web;

import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.Map;

@Controller
public class DOrgWeb {

    @GetMapping("dOrg")
    public String main(){
        return "/pages/org/dOrgMain";
    }

    @GetMapping("dOrgAdd")
    public String dOrgAdd(Map<String, Object> map, String id,String myName){
        map.put("id",id);
        map.put("myName",StringUtils.isNotEmpty(myName)?myName:"无");
        return "/pages/org/dOrgAdd";
    }

    @GetMapping("dOrgUpdate")
    public String dOrgUpdate(Map<String, Object> map, String id){
        map.put("id",id);
        return "/pages/org/dOrgUpdate";
    }

    @GetMapping("dOrgMember")
    public String dOrgMember(Map<String, Object> map, String id){
        map.put("id",id);
        return "/pages/org/dOrgMember";
    }
}
